# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=telegram-qt
pkgver=0.1.0
pkgrel=6
pkgdesc="Qt bindings for the Telegram protocol"
arch=(loong64 x86_64)
url="https://github.com/Kaffeine/telegram-qt"
license=(GPL)
depends=(qt5-base)
makedepends=(cmake)
source=("https://github.com/Kaffeine/telegram-qt/archive/$pkgname-$pkgver.tar.gz")
md5sums=('fcc498a8c2655ee0d9877b1784e76cec')
sha256sums=('b0d6a88bdd0438657dbf737c7233f8b595e8cada495b60953e2ab4a46f406852')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
